home *** CD-ROM | disk | FTP | other *** search
- <?xml version="1.0" encoding="utf-8" ?>
- <!DOCTYPE stack PUBLIC "-//Apple, Inc.//DTD stack V 2.0//EN" "" >
- <stack>
- <name>in.0d6</name>
- <id>-1</id>
- <cardCount>12</cardCount>
- <cardID>65616</cardID>
- <listID>2982</listID>
- <cantModify><false /></cantModify>
- <cantDelete><false /></cantDelete>
- <cantAbort><false /></cantAbort>
- <cardSize>
- <width>512</width>
- <height>432</height>
- </cardSize>
- <script>on openstack
- --
- -- HyperStation interacts very heavily with Hypercard and relies
- -- on the existence of the following global containers. If you write
- -- your own script, just cut and paste these two lines. HyperStation
- -- will do the rest.
- --
- global globalATPData, globalResponseData
- global globalReceiveData, myEntityName
- global globalSKTData, globalNBPData
-
- create menu "Collect"
- put "Run,Lookup,UnNamed,Do Pass" ¬
- into menu "Collect" with menuMessages "run,lookup,unnamed,doPass"
- put "-,Zone Lists,Zone Cards,Summaries" ¬
- after menu "Collect" with menuMessages "empty,go card "Zone List",go first card of bkgnd "zoneInformation",go first card of bkgnd "Summaries""
-
- create menu "Summaries"
- put "Verify,Verify All,-,Total Card,Summarize All,-,Clear Card,Clear Zone Cards,Clear Summaries,Clear Stack," ¬
- into menu "Summaries" with menuMessages "verify,verifyAll,empty,totalcard,summarizeStack,empty,clearCard,clearZoneCards,clearSummaries,clearStack"
-
- put empty into globalResponseData
- put empty into globalAppleTalkData
-
- -- Before we can become an entity on the network, we must first
- -- open up access to the network. ATOPEN performs this fucntion
- -- and relies on the container "globalappleTalkData". DO NOT
- -- use Hyperstation unless your stack defines this global.
- --
- -- Since ATOpen is not given a parameter, it will open both a client
- -- and a server side allowing us to both issue requests and respond
- -- to requests from this node.
- --
- atpopen
- if the result is empty then
- --
- -- if ATOpen was successful, we can go ahead and register our name
- -- with the network. If no name is specified (as is the case here),
- -- then the name selected in the chooser will be used.
- --
- nbpopen
- nbpregisterName "Big Brother"
- if the result is empty then
- -- You're connected and ready to go. Remember, you'll need
- -- to do a lookup using the lookup button before you can talk
- -- to any servers.
- --
- end if
- end if
- end openstack
-
- on closestack
- put empty into GlobalResponseData
- put empty into GlobalAppleTalkData
- --hide background button "memo"
- NBPClose
- ATPClose
- reset menubar
- end closestack
-
- on MinMenus
- disable menuItem "Lookup" of menu "Collect"
- disable menuItem "UnNamed" of menu "Collect"
- disable menuItem "Do Pass" of menu "Collect"
- disable menuItem "Verify" of menu "Summaries"
- disable menuItem "Clear Card" of menu "Summaries"
- disable menuItem "Total Card" of menu "Summaries"
- end MinMenus
-
- on maxMenus
- enable menuItem "Lookup" of menu "Collect"
- enable menuItem "UnNamed" of menu "Collect"
- enable menuItem "Do Pass" of menu "Collect"
- enable menuItem "Verify" of menu "Summaries"
- enable menuItem "Clear Card" of menu "Summaries"
- enable menuItem "Total Card" of menu "Summaries"
- end maxMenus
-
- -- on idle
- -- atpreceive "HandleRequest"
- -- end idle
-
- -- on HandleRequest
- -- global globalResponseData
- -- --
- -- -- A client has issued a request for some data. Acting as a well
- -- -- behaved server, we fill the response data with some information
- -- -- Since this method was called from the ATReceive xcmd, it will
- -- -- return there upon completion causing the response to be sent
- -- -- out "magically". If the response container is blank, the
- -- -- server will "autorespond". Note that responses are limited to
- -- -- to 4624 characters. This is a fundamental limitation of the
- -- -- AppleTalk ATP layer. If you send more than 4624 characters,
- -- -- the response will be truncated for you.
- -- --
- -- visual effect wipe right
- -- go card "in box"
- -- put card field "response" into globalResponseData
- -- end HandleRequest
-
- -- on HandleResponse
- -- global globalReceiveData
- -- --
- -- -- A server is returning a response to a previously queued request.
- -- -- Note that in order to handle a response correctly, you need to
- -- -- specify this or some other method in your ATRequest call.
- -- -- The response data has been placed in the globalReceiveData
- -- -- container for you. All you have to do is look at it.
- -- --
- -- if globalReceiveData is not empty then
- -- push card
- -- set lockscreen to true
- -- go card "in box"
- -- get the number of lines in card field "messages"
- -- add 1 to it
- -- put globalReceiveData into line it of card field "messages"
- -- pop card
- -- set lockscreen to false
- -- end if
- -- end HandleResponse
-
-
- on okay
- --
- -- The method handles the default server response (It is not needed
- -- by clients). Iif you didn't specify a response in GlobalResponseData,
- -- this is what you'll get instead.
- --
- end okay
-
- on run
- -- this routine runs the stack
- get the number of this bkgnd
- if it is 1 then
- put the number of this card into StartCard
- else
- go first card of bkgnd "ZoneInformation"
- put the number of the first card of bkgnd "ZoneInformation" into StartCard
- end if
-
- repeat while (the suspended or the shiftKey is "up")
- makeCopy
- repeat with i = StartCard to the number of the last card of bkgnd "ZoneInformation"
- if (not(the suspended) and the shiftKey is "down") then
- exit run
- end if
- go to card i
- send "lookup" to this card
- if (not(the suspended) and the shiftKey is "down") then
- exit run
- end if
- send "unnamed" to this card
- add 1 to fld passes
- if (not(the suspended) and the shiftKey is "down") then
- exit run
- end if
- send "totalcard" to this card
- end repeat
- put the number of the first card of bkgnd "ZoneInformation" into StartCard
- end repeat
- end run
-
- on verifyAll
- push this card
- go first card of bkgnd "ZoneInformation"
- repeat for (the number of cards in bkgnd "ZoneInformation") - 1
- verify
- go next
- end repeat
- pop card
- end verifyAll
-
- on summarizeStack
- push this card
- go first card of bkgnd "Summaries"
- repeat for (the number of cards in bkgnd "Summaries")
- totalCard
- go next
- end repeat
- pop card
- end summarizeStack
-
- on clearStack
- beep 2
- answer "Erase all data from every card in this stack?" ¬
- with "Cancel" or "OK"
- if it = "Cancel" then
- exit clearStack
- end if
- push card
- lock screen
- repeat with i = 1 to the number of cards in bkgnd "ZoneInformation"
- set cursor to busy
- go card i of bkgnd "ZoneInformation"
- clearCard
- end repeat
- repeat with i = 1 to the number of cards in bkgnd "Summaries"
- set cursor to busy
- go card i of bkgnd "Summaries"
- clearCard
- end repeat
- pop card
- unlock screen with dissolve
- end clearStack
-
- on clearZoneCards
- beep 2
- answer "Erase all data from every zone card in this stack?" ¬
- with "Cancel" or "OK"
- if it = "Cancel" then
- exit clearZoneCards
- end if
- lock screen
- push card
- repeat with i = 1 to the number of cards in bkgnd "ZoneInformation"
- set cursor to busy
- go card i of bkgnd "ZoneInformation"
- clearCard
- end repeat
-
- pop card
- unlock screen with dissolve
- end clearZoneCards
-
- on clearSummaries
- beep 2
- answer "Erase all data from every zone card in this stack?" ¬
- with "Cancel" or "OK"
- if it = "Cancel" then
- exit clearSummaries
- end if
- lock screen
- push card
- repeat with i = 1 to the number of cards in bkgnd "Summaries"
- set cursor to busy
- go card i of bkgnd "Summaries"
- clearCard
- end repeat
-
- pop card
- unlock screen with dissolve
- end clearSummaries
-
- on getNav
- palette Navigotor
- end getNav
-
- on makeCopy
- if isFile("Backup of Running Metrics") then
- eraseFile("Backup of Running Metrics")
- end if
- save stack as "Backup of Running Metrics"
- end makeCopy
- </script>
- <background id="2662" file="background_2662.xml" name="ZoneInformation" />
- <background id="4398" file="background_4398.xml" name="" />
- <background id="8464" file="background_8464.xml" name="Summaries" />
- <background id="64252" file="background_64252.xml" name="" />
- <background id="65507" file="background_65507.xml" name="" />
- <background id="66246" file="background_66246.xml" name="" />
- <card id="65616" file="card_65616.xml" marked="false" name="" owner="65507" />
- <card id="6984" file="card_6984.xml" marked="false" name="Zone List" owner="4398" />
- <card id="66469" file="card_66469.xml" marked="false" name="" owner="66246" />
- <card id="65181" file="card_65181.xml" marked="true" name="" owner="2662" />
- <card id="11070" file="card_11070.xml" marked="false" name="" owner="8464" />
- <card id="27183" file="card_27183.xml" marked="false" name="" owner="8464" />
- <card id="27459" file="card_27459.xml" marked="false" name="" owner="8464" />
- <card id="58617" file="card_58617.xml" marked="false" name="" owner="8464" />
- <card id="58653" file="card_58653.xml" marked="false" name="" owner="8464" />
- <card id="59005" file="card_59005.xml" marked="false" name="" owner="8464" />
- <card id="59317" file="card_59317.xml" marked="false" name="" owner="8464" />
- <card id="64503" file="card_64503.xml" marked="false" name="AllOthers" owner="64252" />
- </stack>
-